<template>
<div>
  <TabBar>
    <tab-bar-item path="/home">
      <img slot="icon-image" src="../../assets/img/tabbar/home.svg">
      <img slot="icon-active" src="../../assets/img/tabbar/home_active.svg">
      <div slot="icon-text">首页</div>
    </tab-bar-item>
    <tab-bar-item path="/shop">
      <img slot="icon-image" src="../../assets/img/tabbar/category.svg">
      <img slot="icon-active" src="../../assets/img/tabbar/category_active.svg">
      <div slot="icon-text">商城</div>
    </tab-bar-item>
    <tab-bar-item path="/school">
      <img slot="icon-image" src="../../assets/img/tabbar/school.svg">
      <img slot="icon-active" src="../../assets/img/tabbar/school_active.svg">
      <div slot="icon-text">校园</div>
    </tab-bar-item>
            <tab-bar-item path="/cart">
      <img slot="icon-image" src="../../assets/img/tabbar/profile.svg">
            <img slot="icon-active" src="../../assets/img/tabbar/profile_active.svg">
      <div slot="icon-text">购物车</div>

    </tab-bar-item>
    <tab-bar-item :path="pathchoic">
      <img slot="icon-image" src="../../assets/img/tabbar/profile.svg">
            <img slot="icon-active" src="../../assets/img/tabbar/profile_active.svg">
      <div slot="icon-text">我的</div>

    </tab-bar-item>

  </TabBar>
</div>
</template>

<script>
import TabBar from "@/components/common/TabBar/TabBar";
import TabBarItem from "@/components/common/TabBar/TabBarItem";
export default {
name: "MainTabBar",
  components:{
  TabBarItem,
    TabBar
  },
  data(){
  return{
    'pathchoic':'/profile'
  }
  },
  methods:{
  },
  created() {
      this.$store.commit('getcookies')
    if (this.$store.state.username){
      this.pathchoic='/profile'
    }
    else {
      this.pathchoic='/login'
    }
  }
}
</script>

<style scoped>

</style>